package builder.banks;

import builder.AbstractOperations;
import builder.BankDataModel;
import builder.OperationNotAllowedException;

/**
 * Created by Vyacheslav on 04.07.2014.
 */
public class EximBankOperations implements AbstractOperations {

    private String bankPhone = "80504433200";

    @Override
    public String getBalance(BankDataModel model) {
        return new StringBuilder().append("Z").append(" ").append(model.getCardPseudonym()).toString();
    }

    @Override
    public String blockCard(BankDataModel model) {
        return new StringBuilder().append("L").append(" ").append(model.getCardPseudonym()).toString();
    }

    @Override
    public String getReport(BankDataModel model) {
        return new StringBuilder().append("V").append(" ").append(model.getCardPseudonym()).toString();
    }

    @Override
    public String moneyTransfer(BankDataModel model) {
        throw new OperationNotAllowedException();
    }

    @Override
    public String unblockCard(BankDataModel model) {
        return new StringBuilder().append("U").append(" ").append(model.getCardPseudonym()).toString();
    }

    @Override
    public String mobileTransfer(BankDataModel model) {
        throw new OperationNotAllowedException();
    }

    @Override
    public String getBankPhone() {
        return bankPhone;
    }
}
